using System;

namespace CStock
{
	public struct RegExStructuresMSN
	{
		private string uRL;
		private string quote;
		private string quoteReduced;
		

		private string time;
		private string bid;
		private string ask;
		private string volume;
		private string volumeTotal;

		/// <summary>
		/// 
		/// </summary>
		public RegExStructuresMSN(int i)
		{
			//723610
			uRL = "http://de.moneycentral.msn.com/investor/quotes/quotes.asp?symbol=";//add the WKN at the end !!

			//search for EUR
			//<td valign="middle" class="h1" align="center"><font color="#FFFFFF"><strong>38,23</strong></font></td>
			//<td valign="middle" class="h1" align="center"><font color="#008000"><strong>79,30</strong></font></td>
		
			 //<TD class=h1 vAlign=center align=middle><FONT color=#ff0000><STRONG>43,11</STRONG></FONT></TD>

			//quote = "<td valign=.middle. class=.h1. align=.center.><font color=.........><strong>(?<1>.*)</strong></font></td>";
			quote = "vAlign=center align=middle><FONT .*\n. color=.........><strong>(?<1>.*)</STRONG></FONT></TD>";
			
			//<td align="center" class="text" bgcolor="#ffffff" nowrap>       
			//                                          23,15
			//                                      </td>

			quoteReduced = 	 "<td align=.center. class=.text. bgcolor=......... nowrap>.*\n.*(?<1>.*).*\n.*</td>";
			// valign="middle" align="center">20:05</td>
            //                                        <td valign="middle" align="center">15.04</td>
            //                                    </tr>
            //                                    <tr bgcolor="#ffffff">
			
			
			time =  "valign=.middle. align=.center.>(?<1>.*)</td>.*\n.*<td valign=.middle. align=.center.>(?<2>.*)</td>.*\n.*</tr>.*\n.*<tr bgcolor=.#ffffff.>";


//			<td valign="middle" align="center" class="h2">Bid</td>
//                                                                <td valign="middle" align="center" class="h2">79,50</td>
//                                                                <td valign="middle" align="center">1.988</td>
			bid = "<td valign=.middle. align=.center. class=.h2.>Bid</td>.*\n.*<td valign=.middle. align=.center. class=.h2.>(?<1>.*)</td>.*\n.*<td valign=.middle. align=.center.>(?<2>.*)</td>";
//
//                                                                <td valign="middle" align="center" class="h2">Ask</td>
//                                                                <td valign="middle" align="center" class="h2">79,63</td>
//                                                                <td valign="middle" align="center">300</td>


			ask ="<td valign=.middle. align=.center. class=.h2.>Ask</td>.*\n.*<td valign=.middle. align=.center. class=.h2.>(?<1>.*)</td>.*\n.*<td valign=.middle. align=.center.>(?<2>.*)</td>";

//Letzter Umsatz</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.573</td>

			volume = "Letzter Umsatz</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(?<1>.*)</td>";
			volumeTotal = "Tagesumsatz</span>&nbsp;&nbsp;&nbsp;&nbsp;(?<1>.*)</td>";
		}
		
		//public int Width;

		/// <summary>
		/// Summary description for TestClass.
		/// </summary>
		public string URL
		{
			get
			{
				return uRL;
			}
			set
			{
				uRL = value;
			}

		}
		public string Quote
		{
			get
			{
				return quote;
			}
			set
			{
				quote = value;
			}
		}
		public string QuoteReduced
		{
			get
			{
				return quoteReduced;
			}
			set
			{
				quoteReduced = value;
			}
		}

		public string Time
		{
			get
			{
				return time;
			}
			set
			{
				time = value;
			}
		}
		public string Bid
		{
			get
			{
				return bid;
			}
			set
			{
				bid = value;
			}
		}
		public string Ask
		{
			get
			{
				return ask;
			}
			set
			{
				ask = value;
			}
		}
		public string Volume
		{
			get
			{
				return volume;
			}
			set
			{
				volume = value;
			}
		}
		public string VolumeTotal
		{
			get
			{
				return volumeTotal;
			}
			set
			{
				volumeTotal = value;
			}
		}


	}
}
